<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<tiles:insert page="/general/templateLoggedIn.jsp">
	<tiles:put name="title" value="Chairs Area"/>
	<tiles:put name="nav"/>
	<tiles:put name="content" type="string">

		<h2>GRE</h2>
		
		Please fill out the form bellow to enter an new GRE.<br><br>
		
		<html:form action="/greToDatabase">
			<table>
				<tr>
					<td>Applicant:</td>
					<td colspan="2">
						<html:select property="applicant">
							<c:forEach var="applicantVar" items="${requestScope.applicants}">
								<html:option value="${applicantVar.applicantId}">${applicantVar.name}, ${applicantVar.firstName} (${applicantVar.mail})</html:option>
							</c:forEach>
						</html:select>
					</td>
				</tr>	
				<tr>
					<td>Analytical Writing:</td>
					<td><html:text property="analytical" size="4"/> Score</td>
					<td><html:text property="analyticalPercent" size="4"/> %</td>
				</tr>
				<tr>
					<td>Verbal Reasoning:</td>
					<td><html:text property="verbal" size="4"/> Score</td>
					<td><html:text property="verbalPercent" size="4"/> %</td>
				</tr>
				<tr>
					<td>Quantitative Reasoning:</td>
					<td><html:text property="quantitative" size="4"/> Score</td>
					<td><html:text property="quantitativePercent" size="4"/> %</td>
				</tr>
				<tr>
					<td>Total:</td>
					<td><html:text property="total" size="4"/> Score</td>
					<td><html:text property="totalPercent" size="4"/> %</td>
				</tr>
				<tr>
					<td>Type:</td>
					<td colspan="2">
						<html:select property="type">
							<html:option value="Computer-based">Computer-based</html:option>
							<html:option value="Paper-based">Paper-based</html:option>
						</html:select>
					</td>
				</tr>
				<tr>
					<td>Month/Year:</td>
					<td><html:text property="month" size="4"/>/</td>
					<td><html:text property="year" size="4"/></td>
				</tr>
				<tr>
					<td>Registration No.:</td>
					<td colspan="2"><html:text property="regNo"/></td>
				</tr>
				<tr>
					<td colspan="3" align="right"><html:submit value="Submit"/></td>
				</tr>
			</table>
		</html:form>
		
	</tiles:put>
</tiles:insert>